"""
Project Name : api_automation_framework
File Name : stream-bytes-n.py
Author : lldhsds
Date : 2024/12/28 20:57
Description: /stream-bytes/{n}, 使用给定的种子生成 n 个随机字节流，每个数据包的大小为指定的块大小。
"""

import requests

def stream_bytes_n(n: int) -> None:
    """
    /stream_bytes/{n}, Streams n random bytes generated with given seed, at given chunk size per packet.
    :param n: int
    :responses 200 Bytes.
    """
    url = f"http://httpbin.org/stream-bytes/{n}"
    headers = {'Accept': 'application/octet-stream'}
    response = requests.get(url, headers=headers)
    print(response.status_code)
    print(response.text)
    print(response.content)
    print(response.headers)

stream_bytes_n(10)
